package com.pt.manage.service.impl;

import java.util.List;
import java.util.Map;

import com.pt.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pt.manage.mapper.myshomeworkMapper;
import com.pt.manage.domain.MysHomeWork;
import com.pt.manage.service.ImyshomeworkService;
import org.springframework.web.multipart.MultipartFile;

/**
 * 学生作业Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class myshomeworkServiceImpl implements ImyshomeworkService 
{
    @Autowired
    private myshomeworkMapper myshomeworkMapper;

    /**
     * 查询学生作业
     * 
     * @param studentID 学生作业主键
     * @return 学生作业
     */
    @Override
    public MysHomeWork selectmyshomeworkByStudentID(Long studentID)
    {
        return myshomeworkMapper.selectmyshomeworkByStudentID(studentID);
    }

    /**
     * 查询学生作业列表
     * 
     * @param map 学生作业
     * @return 学生作业
     */
    @Override
    public List<MysHomeWork> selectmyshomeworkList(Map map)
    {


        System.out.println(myshomeworkMapper.selectmyshomeworkList(map));
        return myshomeworkMapper.selectmyshomeworkList(map);
    }

    /**
     * 新增学生作业
     * 
     * @param codeFile 学生作业
     * @return 结果
     */
    @Override
    public int insertmyshomework(MultipartFile codeFile,MultipartFile wordFile,Long homeworkID)
    {

        return myshomeworkMapper.insertmyshomework(codeFile,wordFile,homeworkID);
    }

    /**
     * 修改学生作业
     * 
     * @param myshomework 学生作业
     * @return 结果
     */
    @Override
    public int updatemyshomework(MysHomeWork myshomework)
    {
        return myshomeworkMapper.updatemyshomework(myshomework);
    }

    /**
     * 批量删除学生作业
     * 
     * @param studentIDs 需要删除的学生作业主键
     * @return 结果
     */
    @Override
    public int deletemyshomeworkByStudentIDs(Long[] studentIDs)
    {
        return myshomeworkMapper.deletemyshomeworkByStudentIDs(studentIDs);
    }

    /**
     * 删除学生作业信息
     * 
     * @param studentID 学生作业主键
     * @return 结果
     */
    @Override
    public int deletemyshomeworkByStudentID(Long studentID)
    {
        return myshomeworkMapper.deletemyshomeworkByStudentID(studentID);
    }
}
